package main
import (
    "fmt"
    "encoding/json"
)
type Student struct {
	Id string
	Name string
	Age int
	Gender string
	Sno string
}

func main() {
	jsonStr := `{"Id":"001","Name":"张三","Age":18,"Gender":"男","Sno":"S0001"}`
	var student Student
	err := json.Unmarshal([]byte(jsonStr), &student)
	if (err != nil) {
		fmt.Println("json unmarshal error:", err)
	} else {
		fmt.Println("json unmarshal success")
		fmt.Printf("%#v", student)
	}
	
}